<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        table{
            width: 400px;
            height: 400px;
            border-collapse: coolapse;
            background-color:red;
        }
        th,td{
            border: 1px solid yellow;
        }
        
    </style>
</head>
<body>
    <script>
       
        // var div=document.getElementById(table);
        var str = "<table>";
        var j = 0;
        while (j < 10) {
            str += "<tr>";
            var i = 0;
            while (i < 10){
                str += "<td></td>";
                i++;
            }
            str += "</tr>";
            j++;
        }
        str += "</table>";
        document.write(str);
       
       
    </script>
    
</body>
</html>